/**
 * Copyright 2008 Benjamin Possolo
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.javenue.util.process;

/**
 * Represents an error that occurs while executing the <code>doTransition()</code> method
 * of a <tt>Transition</tt> or <tt>TransitionWithResult</tt>. User-code defined within a 
 * transition instance may throw a runtime exception while a <tt>TransitionManager</tt> is executing
 * the transition. In such a scenario, the <tt>TransitionManager</tt> will catch the
 * exception, wrap it in a <tt>TransitionException</tt> and then propogate it back to the
 * <tt>Process</tt> that attempted to perform the transition.
 * 
 * @author Benjamin Possolo
 * <p>Created on Jun 28, 2008
 */
public class TransitionException extends RuntimeException {

	/**
	 * Serial Version UID defined to avoid warning.
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * Constructor that sets exception message.
	 * 
	 * @param message the exception message
	 */
	public TransitionException(String message) {
		super(message);
	}

	/**
	 * Constructor that sets the exception message and cause.
	 * 
	 * @param message the message
	 * @param cause the cause of this exception
	 */
	public TransitionException(String message, Throwable cause) {
		super(message, cause);
	}
}
